<?#//v.3.0.0
#///////////////////////////////////////////////////////
#//  COPYRIGHT 2004 Phpauction.org ALL RIGHTS RESERVED//
#///////////////////////////////////////////////////////

include "../includes/config.inc.php";
include "loggedin.inc.php";


if($_POST['action'] == "update" && phpa_securepost($_POST)) {
	$query = "UPDATE PHPAUCTIONXL_settings SET winner_address='".$_POST['winner_address']."'";
	$res = mysql_query($query);
	if(!$res){
		print "Error: $query<BR>".mysql_error();
		exit;
	}else{
		$ERR = $MSG_30_0060;
		$SETTINGS['winner_address'] = $_POST['winner_address'];
	}
}

?>
<HEAD>
<link rel='stylesheet' type='text/css' href='style.css' />
<TITLE>Newsletter Admin</TITLE>
<link href="css/main.css" rel="stylesheet" type="text/css">
</HEAD>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td>
	<table width="100%" border="0" cellspacing="0" cellpadding="0" class="titulo">
        <tr>
          <td class="icono"><img src="images/users_icon2.gif" width="17" height="23" ></td>
          <td class="breadcrumbs"><p><span><?=$MSG_25_0010?></span> &nbsp;&gt;&gt;&nbsp; <?=$MSG_30_0083?></p></td>
        </tr>
     </table>
	 </td>
  </tr>
  <tr>
    <td align="center" valign="middle">&nbsp;</td>
  </tr>
  <tr>
    <td align="center" valign="middle">
		<FORM NAME=newsletter ACTION="<? print basename($PHP_SELF); ?>" METHOD="POST">
          <TABLE WIDTH="95%" BORDER="0" CELLSPACING="0" CELLPADDING="0" ALIGN="CENTER" class="base" style="border:1px solid #ccc;">
            <TR>
              <TD ALIGN=CENTER class=title><p><? print $MSG_30_0083; ?> </p></TD>
            </TR>
            <TR>
              <TD>
			  <TABLE WIDTH="100%" BORDER="0" CELLPADDING="0" cellspacing="0" BGCOLOR="#FFFFFF">
                  <?
                  if(!empty($ERR)) {
				  ?>
                  <TR>
                    <TD COLSPAN=2 ALIGN=CENTER><p><? print $ERR; ?></p> </TD>
                  </TR>
                  <?
                  }
				  ?>
                  <TR>
                    <TD WIDTH="125" VALIGN="top" ALIGN="right">&nbsp;</TD>
                    <TD WIDTH="486">
						<?=$MSG_30_0084?>                      
                    </TD>
                  </TR>
                  <TR>
                    <TD WIDTH="125" VALIGN="top"><p><?=$MSG_30_0085?></p> </TD>
                    <TD WIDTH="486">
						<INPUT TYPE=radio NAME=winner_address VALUE='y' <?if($SETTINGS['winner_address']=='y') print " checked";?>><?=$MSG_030?>
						<INPUT TYPE=radio NAME=winner_address VALUE='n' <?if($SETTINGS['winner_address']=='n') print " checked";?>><?=$MSG_029?>
                    </TD>
                  </TR>
                  <TR>
                    <TD WIDTH="125" VALIGN="top" ALIGN="right"></TD>
                    <TD WIDTH="486"><INPUT TYPE=submit VALUE="<?=$MSG_530?>" class="action">
                      <INPUT TYPE="hidden" NAME="action" VALUE="update" /> <INPUT TYPE="hidden" NAME="security" VALUE="<?php echo $_SESSION['security'];?>" />
                    </TD>
                  </TR>
                </TABLE>
				
			  </TD>
            </TR>
          </TABLE>
        </FORM>
      </TD>
  </TR>
</TABLE>
</BODY>
</HTML>
